package com.yc.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
import com.yc.dto.Result;
import com.yc.entity.Mgoods;
import com.yc.mapper.MtypeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author cxw
 * @since 2024-11-10
 */
@Controller
@RequestMapping("//mtype")
public class MtypeController {
    @Autowired
    MtypeMapper mtypeMapper;
//    @RequestMapping("/mtype")
//    Result type(@RequestParam String type){
//        Page<Mgoods> page=new PageDTO<>(1,8);
//        IPage<Mgoods> allmgoods=mtypeMapper.selectByType(page,type);
//        List<Mgoods>allmgoodtype=allmgoods.getRecords();
//        return Result.ok("分类查询成功",allmgoodtype);
//    }
}
